3.1.67 \(\int \frac {\cos ^3(c+d x)}{(a+a \sin (c+d x))^2} \, dx\) [67]

Optimal. Leaf size=32 \[ \frac {2 \log (1+\sin (c+d x))}{a^2 d}-\frac {\sin (c+d x)}{a^2 d} \]

[Out]

2*ln(1+sin(d*x+c))/a^2/d-sin(d*x+c)/a^2/d

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 32, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {2746, 45} \begin {gather*} \frac {2 \log (\sin (c+d x)+1)}{a^2 d}-\frac {\sin (c+d x)}{a^2 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^3/(a + a*Sin[c + d*x])^2,x]

[Out]

(2*Log[1 + Sin[c + d*x]])/(a^2*d) - Sin[c + d*x]/(a^2*d)

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2746

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x]
&& IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2, 0] && (GeQ[p, -1] ||  !IntegerQ[m + 1/2])

Rubi steps

\begin {align*} \int \frac {\cos ^3(c+d x)}{(a+a \sin (c+d x))^2} \, dx &=\frac {\text {Subst}\left (\int \frac {a-x}{a+x} \, dx,x,a \sin (c+d x)\right )}{a^3 d}\\ &=\frac {\text {Subst}\left (\int \left (-1+\frac {2 a}{a+x}\right ) \, dx,x,a \sin (c+d x)\right )}{a^3 d}\\ &=\frac {2 \log (1+\sin (c+d x))}{a^2 d}-\frac {\sin (c+d x)}{a^2 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 26, normalized size = 0.81 \begin {gather*} -\frac {-2 \log (1+\sin (c+d x))+\sin (c+d x)}{a^2 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^3/(a + a*Sin[c + d*x])^2,x]

[Out]

-((-2*Log[1 + Sin[c + d*x]] + Sin[c + d*x])/(a^2*d))

________________________________________________________________________________________

Maple [A]
time = 0.19, size = 28, normalized size = 0.88

method result size
derivativedivides \(\frac {-\sin \left (d x +c \right )+2 \ln \left (1+\sin \left (d x +c \right )\right )}{d \,a^{2}}\) \(28\)
default \(\frac {-\sin \left (d x +c \right )+2 \ln \left (1+\sin \left (d x +c \right )\right )}{d \,a^{2}}\) \(28\)
risch \(-\frac {2 i x}{a^{2}}+\frac {i {\mathrm e}^{i \left (d x +c \right )}}{2 a^{2} d}-\frac {i {\mathrm e}^{-i \left (d x +c \right )}}{2 a^{2} d}-\frac {4 i c}{a^{2} d}+\frac {4 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{a^{2} d}\) \(76\)
norman \(\frac {-\frac {2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d a}-\frac {2 \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}-\frac {6 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}-\frac {10 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}-\frac {10 \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}-\frac {6 \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}-\frac {14 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}-\frac {14 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3} a \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {4 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{a^{2} d}-\frac {2 \ln \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a^{2} d}\) \(227\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^3/(a+a*sin(d*x+c))^2,x,method=_RETURNVERBOSE)

[Out]

1/d/a^2*(-sin(d*x+c)+2*ln(1+sin(d*x+c)))

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 30, normalized size = 0.94 \begin {gather*} \frac {\frac {2 \, \log \left (\sin \left (d x + c\right ) + 1\right )}{a^{2}} - \frac {\sin \left (d x + c\right )}{a^{2}}}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3/(a+a*sin(d*x+c))^2,x, algorithm="maxima")

[Out]

(2*log(sin(d*x + c) + 1)/a^2 - sin(d*x + c)/a^2)/d

________________________________________________________________________________________

Fricas [A]
time = 0.34, size = 27, normalized size = 0.84 \begin {gather*} \frac {2 \, \log \left (\sin \left (d x + c\right ) + 1\right ) - \sin \left (d x + c\right )}{a^{2} d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3/(a+a*sin(d*x+c))^2,x, algorithm="fricas")

[Out]

(2*log(sin(d*x + c) + 1) - sin(d*x + c))/(a^2*d)

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 150 vs. \(2 (27) = 54\).
time = 0.53, size = 150, normalized size = 4.69 \begin {gather*} \begin {cases} \frac {2 \log {\left (\sin {\left (c + d x \right )} + 1 \right )} \sin {\left (c + d x \right )}}{a^{2} d \sin {\left (c + d x \right )} + a^{2} d} + \frac {2 \log {\left (\sin {\left (c + d x \right )} + 1 \right )}}{a^{2} d \sin {\left (c + d x \right )} + a^{2} d} - \frac {2 \sin ^{2}{\left (c + d x \right )}}{a^{2} d \sin {\left (c + d x \right )} + a^{2} d} - \frac {\cos ^{2}{\left (c + d x \right )}}{a^{2} d \sin {\left (c + d x \right )} + a^{2} d} + \frac {2}{a^{2} d \sin {\left (c + d x \right )} + a^{2} d} & \text {for}\: d \neq 0 \\\frac {x \cos ^{3}{\left (c \right )}}{\left (a \sin {\left (c \right )} + a\right )^{2}} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**3/(a+a*sin(d*x+c))**2,x)

[Out]

Piecewise((2*log(sin(c + d*x) + 1)*sin(c + d*x)/(a**2*d*sin(c + d*x) + a**2*d) + 2*log(sin(c + d*x) + 1)/(a**2
*d*sin(c + d*x) + a**2*d) - 2*sin(c + d*x)**2/(a**2*d*sin(c + d*x) + a**2*d) - cos(c + d*x)**2/(a**2*d*sin(c +
 d*x) + a**2*d) + 2/(a**2*d*sin(c + d*x) + a**2*d), Ne(d, 0)), (x*cos(c)**3/(a*sin(c) + a)**2, True))

________________________________________________________________________________________

Giac [A]
time = 8.02, size = 54, normalized size = 1.69 \begin {gather*} -\frac {\frac {2 \, \log \left (\frac {{\left | a \sin \left (d x + c\right ) + a \right |}}{{\left (a \sin \left (d x + c\right ) + a\right )}^{2} {\left | a \right |}}\right )}{a^{2}} + \frac {a \sin \left (d x + c\right ) + a}{a^{3}}}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3/(a+a*sin(d*x+c))^2,x, algorithm="giac")

[Out]

-(2*log(abs(a*sin(d*x + c) + a)/((a*sin(d*x + c) + a)^2*abs(a)))/a^2 + (a*sin(d*x + c) + a)/a^3)/d

________________________________________________________________________________________

Mupad [B]
time = 0.06, size = 27, normalized size = 0.84 \begin {gather*} \frac {2\,\ln \left (\sin \left (c+d\,x\right )+1\right )-\sin \left (c+d\,x\right )}{a^2\,d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(c + d*x)^3/(a + a*sin(c + d*x))^2,x)

[Out]

(2*log(sin(c + d*x) + 1) - sin(c + d*x))/(a^2*d)

________________________________________________________________________________________